{% extends 'AnketaBundle::layout.html.twig' %}
{% block navigation %}
    {{ menu.statistics.render([season.id, 'my_reports'])|raw }}
{% endblock %}
{% block content %}
<h1>{{ title }}
</h1>
{% if studyProgrammeLink is defined %}<a href="{{ studyProgrammeLink }}">{{ trans('reports.report.vysledky_programu') }}</a>
{% endif %}
<h2>{{ trans('reports.report.hodnotenia_ucitelov') }}:
</h2>
<div class="results-comments">
{% for teacher in teachers %}
{% if teacher.evaluation[2] != 0 %}
    <div class="comment">
        <table>
            <tr>
                <td> {{ teacher.formattedName }}</td>
                <td>{{ trans('reports.report.pocet_hviezdiciek', {'%stars%': teacher.evaluation[1]}) }}</td>
                <td>({{ trans('reports.report.pocet_hodnoteni', {'%votes%': teacher.evaluation[2]}) }})</td></tr>
        </table>
        <ul>
{% for teacherSubject in teacher.subjects %}
<li>
<a href="{{ teacher.links[teacherSubject.id] }}">{{ teacherSubject.code }} {{ teacherSubject.name }}</a>
</li>
{% endfor %}
        </ul>
    </div>
{% endif %}
{% endfor %}
</div>
<h2>{{ trans('reports.report.hodnotenia_predmetov') }}:
</h2>
<div class="results-comments">
{% for subject in subjects %}
{% if subject.evaluation[2] != 0 %}
    <div class="comment">
        <table>
            <tr>
                <td colspan="2"><a href="{{ subject.link }}">{{ subject.code }} {{  subject.name  }}</a></td>
            </tr>
            <tr>
                <td>{{ trans('reports.report.pocet_hviezdiciek', {'%stars%': subject.evaluation[1]}) }}</td>
                <td>({{ trans('reports.report.pocet_hodnoteni', {'%votes%': subject.evaluation[2]}) }})</td>
            </tr>
{% if subject.teacher | length != 0 %}
<tr>
<td colspan="2">
(
{% for subjectTeacher in subject.teacher %}
<a href="{{ subject.links[subjectTeacher.id] }}">{{ subjectTeacher.formattedName }}</a> &nbsp;
{% endfor %}
)
</td>
</tr>
{% endif %}
        </table>
    </div>
{% endif %}
{% endfor %}
</div>
{% endblock %}
